package com.abaaba.project2.controller;

import com.abaaba.project2.bean.bo.AdminAddressBaseReq;
import com.abaaba.project2.bean.bo.AdminFeedbackBaseReq;
import com.abaaba.project2.bean.vo.AdminAddressVo;
import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.service.AdminAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/address")
public class AdminAddressController {
    @Autowired
    AdminAddressService adminAddressService;

    @RequestMapping("/list")
    public BaseRespVo getAddressList(AdminAddressBaseReq baseReq) {
        AdminAddressVo adminAddressVo = adminAddressService.getAddressList(baseReq.getPage(),
                baseReq.getLimit(),baseReq.getUserId(),baseReq.getName(), baseReq.getSort(),
                baseReq.getOrder());
        return BaseRespVo.ok(adminAddressVo);
    }
}
